//
//  ViewController.m
//  MJBannerPlayer
//
//  Created by WuXushun on 16/1/21.
//  Copyright © 2016年 wuxushun. All rights reserved.
//

#import "ViewController.h"
#import "MJBannnerPlayer.h"

@interface ViewController ()<MJBannnerPlayerDeledage>

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    //NSArray *temp = @[@"https://img1.doubanio.com/view/movie_poster_cover/lpst/public/p2279801008.jpg",@"https://img1.doubanio.com/view/movie_poster_cover/lpst/public/p2189558022.jpg",@"https://img3.doubanio.com/lpic/s3890016.jpg",@"https://img3.doubanio.com/lpic/s4654355.jpg"];
    
    NSArray *temp = @[[UIImage imageNamed:@"1"],[UIImage imageNamed:@"2"]];
    [MJBannnerPlayer initWithSourceArray:temp
                            addTarget:self
                             delegate:self
                             withSize:CGRectMake(0, 50, self.view.frame.size.width, 187.5 / 667 * self.view.frame.size.height)
                     withTimeInterval:2.f];
    
}

-(void)MJBannnerPlayer:(MJBannnerPlayer *)bannerPlayer didSelectedIndex:(NSInteger)index{

    NSLog(@"%ld",index);

}

@end
